class fragments::docker(String $aliyun_booster) {
      if $facts['os']['name'] != 'Ubuntu' || $facts['os']['lsb']['distcodename'] != 'xenial' {
         fail('Only Ubuntu 16.04 is supported.');
      }
      package { ['docker.io', 'docker-compose']:
              ensure => present,
      }
      file { '/etc/systemd/system/docker.service.d':
           ensure => directory,
           owner => root,
      }
      file { '/etc/systemd/system/docker.service.d/mirror.conf':
           ensure => present,
           owner => root,
           mode => '0664',
           content => "[Service]\nExecStart=\nExecStart=/usr/bin/docker daemon -H fd:// --registry-mirror=https://038ym3yo.mirror.aliyuncs.com",
           require => File['/etc/systemd/system/docker.service.d']
      }
      
}
